package com.kgc.sbt.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * Created on 2021/8/12.
 * <p>
 * Author : Lcywings
 * <p>
 * Description : 抢购自动配置类
 */
@Component
@ConfigurationProperties(prefix = "buy.limit")
@Data
public class BuyLimitConfig implements Serializable {

    /**
     * 序列号
     */
    private static final long serialVersionUID = 8907031724969222486L;

    /**
     * 库存数量的前缀
     */
    private String stockNumPrefix;
    /**
     * 锁定用户的标识前缀
     */
    private String lockUerPrefix;
    /**
     * 抢购活动的时长
     */
    private Integer buyLimitTime;

    /**
     * 商品库存锁定标识前缀
     */
    private String lockProdStockPrefix;
    /**
     * 商品库存锁定时长
     */
    private Integer lockProdStockTime;

    /**
     * 生成订单超时时长
     */
    private Integer tradeOrderLimitTime;

}